import request from '@/api/myRequest'
// 活动列表
function findAllRecommends() {
  return request({
    url: '/lejuAdmin/homeRecommend/findAllRecommends',
    method: 'GET'
  })
}
// 删除活动
function delRecommend(id) {
  return request({
    url: `/lejuAdmin/homeRecommend/delRecommend/${id}`,
    method: 'DELETE'
  })
}

// 活动明细
function homeRecommend(id) {
  return request({
    url: `/lejuAdmin/homeRecommend/${id}`,
    method: 'GET'
  })
}

// 修改限时活动
function updateRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/updateRecommend`,
    method: 'POST',
    data
  })
}

// 添加限时活动
function addRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/addRecommend`,
    method: 'POST',
    data
  })
}

// 品牌列表
function findAllBrand() {
  return request({
    url: `/lejuAdmin/brand/findAllBrand`,
    method: 'GET'
  })
}
// 分页查询商品列表
function productsByPage(start, limit, data) {
  return request({
    url: `/lejuAdmin/product/productsByPage/${start}/${limit}`,
    method: 'POST',
    data
  })
}
export { findAllRecommends, delRecommend, homeRecommend, updateRecommend, findAllBrand, productsByPage, addRecommend }
